﻿using System.Collections.Generic;
using JStore.Core.Entities;
using JStore.Data.Daos;

namespace JStore.Tasks
{
    /// <summary>
    ///
    /// </summary>
    public class MenusTask
    {
        private readonly MenusDao _menusDao = new MenusDao();

        public List<Menus> GetAll()
        {
            return _menusDao.GetAll();
        }

        public List<Menus> GetParentList()
        {
            return _menusDao.GetParentList();
        }

        public Menus GetByMenuId(int menuid)
        {
            return _menusDao.GetByMenuId(menuid);
        }

        public void Add(Menus info)
        {
            _menusDao.Add(info);
        }

        public void Update(Menus info)
        {
            _menusDao.Update(info);
        }

        public void DeleteByMenuId(int menuId)
        {
            _menusDao.DeleteByMenuId(menuId);
        }

        public List<Menus> GetListByIds(List<int> menuIds)
        {
            return _menusDao.GetListByIds(menuIds);
        }
    }
}

